package com.wanxi;

import java.util.Scanner;

public class Util {

    //得到字符串
    public static String getString(String tips) {
        Scanner scanner = new Scanner(System.in);
        System.out.println(tips);
        String string = scanner.next();
        return string;
    }

    // 封装输出
    public static void print(String message, Object... params) {
        for (int i = 1; i <= params.length; i++) {
            // 替换占位符
            message = message.replace("{" + i + "}", params[i - 1] + "");
        }
        System.out.println(message);
    }
}
